package com.tanhua.server.controller;

import com.tanhua.server.interceptors.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/huanxin")
public class HuanxinController {


    @GetMapping(value = "/user",name = "获取环信用户信息")
    public ResponseEntity user(){
        Long userId = UserHolder.getUserId();

        Map<String,String> map = new HashMap();
        map.put("username",userId.toString());
        map.put("password","123456");


        System.out.println("执行了。获取环信用户信息。。。方法");
        return ResponseEntity.ok(map);

    }
}
